<{include file="public_html/header.html"}>
<{include file="public_html/left_menu.html"}>
<blockquote class="layui-elem-quote"><{$action}></blockquote>
<fieldset class="layui-elem-field">
	<legend>按条件搜索</legend>
	<div class="layui-field-box">
		<form class="layui-form layui-form-pane1" method="post" action="<{$current_url}>">
			<div class="layui-form-item">
		    	<div class="layui-inline">
		    		<input type="text" name="search" placeholder="广告位名称" value="<{if $data['search']}><{$data['search']}><{/if}>" class="layui-input">
		    	</div>
		    	<div class="layui-inline">
		    		<button type="submit" class="layui-btn">搜索</button>
		    		<a class="layui-btn" href="/advertising/ad_add"><i class="layui-icon"></i> 添加广告位</a>
		    	</div>
	    	</div>
		</form>
	</div>
</fieldset>

<form class="layui-form layui-form-pane1" method="post" delete_action="/advertising/delete_cate">
		<table class="layui-table" lay-even lay-skin="row">
		  	<thead>
			  	<tr>
				  	<th>ID</th>
				  	<th>广告位名称</th>
				  	<th>广告位高度</th>
				  	<th>广告位宽度</th>
				  	<th>广告位标识</th>
				  	<th>广告位所属项目</th>
				  	<th>排序</th>
				  	<th>添加日期</th>
				  	<th>操作</th>
			  	</tr>
		  	</thead>
		  	<tbody>
		  	<{foreach from=$list item=item}>
			  	<tr>
			  		<td class="center">
			  			<label class="checkbox inline">
							<input type="checkbox" name="ids[]" value="<{$item['id']}>"> <{$item['id']}>
							<input type="hidden" name="cat_name[<{$item['id']}>]" value="<{$item['sign']}>" />
						</label>
			  		</td>
			  		<td class="center"><a href="/advertising/index/<{$item['sign']}>" target="_blank"><{$item['ad_position_name']}></a></td>
			  		<td class="center"><{$item['ad_position_height']}></td>
			  		<td class="center"><{$item['ad_position_width']}></td>
			  		<td class="center"><{$item['sign']}></td>
			  		<td class="center">
			  			<{if $item['project_type'] == 1}>
			  			大米广场页
			  			<{elseif $item['project_type'] == 2}>
			  			大米发现页
			  			<{elseif $item['project_type'] == 100}>
			  			樱桃首页
			  			<{elseif $item['project_type'] == 101}>
			  			樱桃发现页
			  			<{elseif $item['project_type'] == 102}>
			  			樱桃注册成功页
			  			<{elseif $item['project_type'] == 103}>
			  			樱桃H5视频播放页
			  			<{/if}>

			  		</td>
		  			<td class="center"><input style="width:40px;" name="sort[<{$item['id']}>]" maxlength="4" type="text" value="<{$item['sort']}>" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" /></td>
			  		<td class="center"><{$item['add_time']|date_format:'%Y-%m-%d %H:%M:%S'}></td>
			  		<td class="center">
						<a class="layui-btn layui-btn-primary layui-btn-small" href="/advertising/edit_cate/<{$item['id']}>" target="_blank"><i class="layui-icon"></i></a>
						<a class="layui-btn layui-btn-primary layui-btn-small delete_data" href="/advertising/delete_cate/<{$item['id']}>"><i class="layui-icon"></i></a>
					</td>
			  	</tr>
		  	<{/foreach}>
		  	<{if $list|count eq 0}>
		  		<tr>
			  		<td class="center" style=" height:120px; text-align:center;line-height:120px;" colspan="9">
						赞无数据！
					</td>
			  	</tr>
		  	<{/if}>
		  	<tr>
				<td class="center" colspan="9">
					<input type="checkbox" lay-filter="checkbox_all" title="全选">
					<button id="delete" class="layui-btn layui-btn-primary layui-btn-small" style="margin-top:4px;"><i class="layui-icon"></i> 批量删除</button>
				</td>
			</tr>
	  		</tbody>
	  	</table>
  	</form>
  	<div class="layui-box layui-laypage layui-laypage-default">
		<{$pagination}>
	</div>
<{include file="public_html/footer.html"}>